3.1.48 \(\int \frac {x (d+e x^2+f x^4)}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=103 \[ -\frac {\tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right ) \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )}{2 c^2 \sqrt {b^2-4 a c}}+\frac {(c e-b f) \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac {f x^2}{2 c} \]

________________________________________________________________________________________

Rubi [A]  time = 0.18, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {1663, 1657, 634, 618, 206, 628} \begin {gather*} -\frac {\tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right ) \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )}{2 c^2 \sqrt {b^2-4 a c}}+\frac {(c e-b f) \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac {f x^2}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4),x]

[Out]

(f*x^2)/(2*c) - ((2*c^2*d - b*c*e + b^2*f - 2*a*c*f)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c^2*Sqrt[b^2
 - 4*a*c]) + ((c*e - b*f)*Log[a + b*x^2 + c*x^4])/(4*c^2)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 1663

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)
*SubstFor[x^2, Pq, x]*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x^2] && Inte
gerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {x \left (d+e x^2+f x^4\right )}{a+b x^2+c x^4} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {d+e x+f x^2}{a+b x+c x^2} \, dx,x,x^2\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (\frac {f}{c}+\frac {c d-a f+(c e-b f) x}{c \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )\\ &=\frac {f x^2}{2 c}+\frac {\operatorname {Subst}\left (\int \frac {c d-a f+(c e-b f) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 c}\\ &=\frac {f x^2}{2 c}+\frac {(c e-b f) \operatorname {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2}+\frac {\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) \operatorname {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2}\\ &=\frac {f x^2}{2 c}+\frac {(c e-b f) \log \left (a+b x^2+c x^4\right )}{4 c^2}-\frac {\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c^2}\\ &=\frac {f x^2}{2 c}-\frac {\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 c^2 \sqrt {b^2-4 a c}}+\frac {(c e-b f) \log \left (a+b x^2+c x^4\right )}{4 c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 100, normalized size = 0.97 \begin {gather*} \frac {\frac {2 \tan ^{-1}\left (\frac {b+2 c x^2}{\sqrt {4 a c-b^2}}\right ) \left (-c (2 a f+b e)+b^2 f+2 c^2 d\right )}{\sqrt {4 a c-b^2}}+(c e-b f) \log \left (a+b x^2+c x^4\right )+2 c f x^2}{4 c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4),x]

[Out]

(2*c*f*x^2 + (2*(2*c^2*d + b^2*f - c*(b*e + 2*a*f))*ArcTan[(b + 2*c*x^2)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*
c] + (c*e - b*f)*Log[a + b*x^2 + c*x^4])/(4*c^2)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x \left (d+e x^2+f x^4\right )}{a+b x^2+c x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(x*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4),x]

[Out]

IntegrateAlgebraic[(x*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4), x]

________________________________________________________________________________________

fricas [A]  time = 1.13, size = 318, normalized size = 3.09 \begin {gather*} \left [\frac {2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} f x^{2} - {\left (2 \, c^{2} d - b c e + {\left (b^{2} - 2 \, a c\right )} f\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c + {\left (2 \, c x^{2} + b\right )} \sqrt {b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) + {\left ({\left (b^{2} c - 4 \, a c^{2}\right )} e - {\left (b^{3} - 4 \, a b c\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}, \frac {2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} f x^{2} - 2 \, {\left (2 \, c^{2} d - b c e + {\left (b^{2} - 2 \, a c\right )} f\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {{\left (2 \, c x^{2} + b\right )} \sqrt {-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) + {\left ({\left (b^{2} c - 4 \, a c^{2}\right )} e - {\left (b^{3} - 4 \, a b c\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a),x, algorithm="fricas")

[Out]

[1/4*(2*(b^2*c - 4*a*c^2)*f*x^2 - (2*c^2*d - b*c*e + (b^2 - 2*a*c)*f)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^4 + 2*b*c
*x^2 + b^2 - 2*a*c + (2*c*x^2 + b)*sqrt(b^2 - 4*a*c))/(c*x^4 + b*x^2 + a)) + ((b^2*c - 4*a*c^2)*e - (b^3 - 4*a
*b*c)*f)*log(c*x^4 + b*x^2 + a))/(b^2*c^2 - 4*a*c^3), 1/4*(2*(b^2*c - 4*a*c^2)*f*x^2 - 2*(2*c^2*d - b*c*e + (b
^2 - 2*a*c)*f)*sqrt(-b^2 + 4*a*c)*arctan(-(2*c*x^2 + b)*sqrt(-b^2 + 4*a*c)/(b^2 - 4*a*c)) + ((b^2*c - 4*a*c^2)
*e - (b^3 - 4*a*b*c)*f)*log(c*x^4 + b*x^2 + a))/(b^2*c^2 - 4*a*c^3)]

________________________________________________________________________________________

giac [A]  time = 1.78, size = 99, normalized size = 0.96 \begin {gather*} \frac {f x^{2}}{2 \, c} - \frac {{\left (b f - c e\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, c^{2}} + \frac {{\left (2 \, c^{2} d + b^{2} f - 2 \, a c f - b c e\right )} \arctan \left (\frac {2 \, c x^{2} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt {-b^{2} + 4 \, a c} c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a),x, algorithm="giac")

[Out]

1/2*f*x^2/c - 1/4*(b*f - c*e)*log(c*x^4 + b*x^2 + a)/c^2 + 1/2*(2*c^2*d + b^2*f - 2*a*c*f - b*c*e)*arctan((2*c
*x^2 + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*c^2)

________________________________________________________________________________________

maple [B]  time = 0.00, size = 211, normalized size = 2.05 \begin {gather*} -\frac {a f \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, c}+\frac {b^{2} f \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{2 \sqrt {4 a c -b^{2}}\, c^{2}}-\frac {b e \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{2 \sqrt {4 a c -b^{2}}\, c}+\frac {f \,x^{2}}{2 c}+\frac {d \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}-\frac {b f \ln \left (c \,x^{4}+b \,x^{2}+a \right )}{4 c^{2}}+\frac {e \ln \left (c \,x^{4}+b \,x^{2}+a \right )}{4 c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a),x)

[Out]

1/2*f*x^2/c-1/4/c^2*ln(c*x^4+b*x^2+a)*b*f+1/4/c*ln(c*x^4+b*x^2+a)*e-1/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(
4*a*c-b^2)^(1/2))*a*f+1/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*d+1/2/c^2/(4*a*c-b^2)^(1/2)*ar
ctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b^2*f-1/2/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b*e

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x^4+e*x^2+d)/(c*x^4+b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more details)Is 4*a*c-b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 1.83, size = 1081, normalized size = 10.50 \begin {gather*} \frac {f\,x^2}{2\,c}+\frac {\ln \left (c\,x^4+b\,x^2+a\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{2\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}+\frac {\mathrm {atan}\left (\frac {2\,c^2\,\left (4\,a\,c-b^2\right )\,\left (x^2\,\left (\frac {\frac {\left (\frac {6\,f\,b^2\,c^2-6\,e\,b\,c^3+4\,d\,c^4-4\,a\,f\,c^3}{c^2}+\frac {4\,b\,c^2\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{16\,a\,c^3-4\,b^2\,c^2}\right )\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}{8\,c^2\,\sqrt {4\,a\,c-b^2}}+\frac {b\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{2\,\sqrt {4\,a\,c-b^2}\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}}{a}-\frac {b\,\left (\frac {b^3\,f^2-2\,b^2\,c\,e\,f+b\,c^2\,e^2+d\,b\,c^2\,f-a\,b\,c\,f^2-d\,c^3\,e+a\,c^2\,e\,f}{c^2}+\frac {\left (\frac {6\,f\,b^2\,c^2-6\,e\,b\,c^3+4\,d\,c^4-4\,a\,f\,c^3}{c^2}+\frac {4\,b\,c^2\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{16\,a\,c^3-4\,b^2\,c^2}\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{2\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}-\frac {b\,{\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}^2}{2\,c^2\,\left (4\,a\,c-b^2\right )}\right )}{2\,a\,\sqrt {4\,a\,c-b^2}}\right )-\frac {\frac {\left (\frac {8\,a\,c^3\,e-8\,a\,b\,c^2\,f}{c^2}-\frac {8\,a\,c^2\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{16\,a\,c^3-4\,b^2\,c^2}\right )\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}{8\,c^2\,\sqrt {4\,a\,c-b^2}}-\frac {a\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{\sqrt {4\,a\,c-b^2}\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}}{a}+\frac {b\,\left (\frac {\left (\frac {8\,a\,c^3\,e-8\,a\,b\,c^2\,f}{c^2}-\frac {8\,a\,c^2\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{16\,a\,c^3-4\,b^2\,c^2}\right )\,\left (2\,f\,b^3-2\,e\,b^2\,c-8\,a\,f\,b\,c+8\,a\,e\,c^2\right )}{2\,\left (16\,a\,c^3-4\,b^2\,c^2\right )}-\frac {a\,b^2\,f^2-2\,a\,b\,c\,e\,f+a\,c^2\,e^2}{c^2}+\frac {a\,{\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}^2}{c^2\,\left (4\,a\,c-b^2\right )}\right )}{2\,a\,\sqrt {4\,a\,c-b^2}}\right )}{4\,a^2\,c^2\,f^2-4\,a\,b^2\,c\,f^2+4\,a\,b\,c^2\,e\,f-8\,a\,c^3\,d\,f+b^4\,f^2-2\,b^3\,c\,e\,f+4\,b^2\,c^2\,d\,f+b^2\,c^2\,e^2-4\,b\,c^3\,d\,e+4\,c^4\,d^2}\right )\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}{2\,c^2\,\sqrt {4\,a\,c-b^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(d + e*x^2 + f*x^4))/(a + b*x^2 + c*x^4),x)

[Out]

(f*x^2)/(2*c) + (log(a + b*x^2 + c*x^4)*(2*b^3*f + 8*a*c^2*e - 2*b^2*c*e - 8*a*b*c*f))/(2*(16*a*c^3 - 4*b^2*c^
2)) + (atan((2*c^2*(4*a*c - b^2)*(x^2*(((((4*c^4*d + 6*b^2*c^2*f - 4*a*c^3*f - 6*b*c^3*e)/c^2 + (4*b*c^2*(2*b^
3*f + 8*a*c^2*e - 2*b^2*c*e - 8*a*b*c*f))/(16*a*c^3 - 4*b^2*c^2))*(2*c^2*d + b^2*f - 2*a*c*f - b*c*e))/(8*c^2*
(4*a*c - b^2)^(1/2)) + (b*(2*c^2*d + b^2*f - 2*a*c*f - b*c*e)*(2*b^3*f + 8*a*c^2*e - 2*b^2*c*e - 8*a*b*c*f))/(
2*(4*a*c - b^2)^(1/2)*(16*a*c^3 - 4*b^2*c^2)))/a - (b*((b^3*f^2 + b*c^2*e^2 - c^3*d*e - a*b*c*f^2 + a*c^2*e*f
+ b*c^2*d*f - 2*b^2*c*e*f)/c^2 + (((4*c^4*d + 6*b^2*c^2*f - 4*a*c^3*f - 6*b*c^3*e)/c^2 + (4*b*c^2*(2*b^3*f + 8
*a*c^2*e - 2*b^2*c*e - 8*a*b*c*f))/(16*a*c^3 - 4*b^2*c^2))*(2*b^3*f + 8*a*c^2*e - 2*b^2*c*e - 8*a*b*c*f))/(2*(
16*a*c^3 - 4*b^2*c^2)) - (b*(2*c^2*d + b^2*f - 2*a*c*f - b*c*e)^2)/(2*c^2*(4*a*c - b^2))))/(2*a*(4*a*c - b^2)^
(1/2))) - ((((8*a*c^3*e - 8*a*b*c^2*f)/c^2 - (8*a*c^2*(2*b^3*f + 8*a*c^2*e - 2*b^2*c*e - 8*a*b*c*f))/(16*a*c^3
 - 4*b^2*c^2))*(2*c^2*d + b^2*f - 2*a*c*f - b*c*e))/(8*c^2*(4*a*c - b^2)^(1/2)) - (a*(2*c^2*d + b^2*f - 2*a*c*
f - b*c*e)*(2*b^3*f + 8*a*c^2*e - 2*b^2*c*e - 8*a*b*c*f))/((4*a*c - b^2)^(1/2)*(16*a*c^3 - 4*b^2*c^2)))/a + (b
*((((8*a*c^3*e - 8*a*b*c^2*f)/c^2 - (8*a*c^2*(2*b^3*f + 8*a*c^2*e - 2*b^2*c*e - 8*a*b*c*f))/(16*a*c^3 - 4*b^2*
c^2))*(2*b^3*f + 8*a*c^2*e - 2*b^2*c*e - 8*a*b*c*f))/(2*(16*a*c^3 - 4*b^2*c^2)) - (a*b^2*f^2 + a*c^2*e^2 - 2*a
*b*c*e*f)/c^2 + (a*(2*c^2*d + b^2*f - 2*a*c*f - b*c*e)^2)/(c^2*(4*a*c - b^2))))/(2*a*(4*a*c - b^2)^(1/2))))/(4
*c^4*d^2 + b^4*f^2 + 4*a^2*c^2*f^2 + b^2*c^2*e^2 - 8*a*c^3*d*f - 4*b*c^3*d*e - 2*b^3*c*e*f - 4*a*b^2*c*f^2 + 4
*b^2*c^2*d*f + 4*a*b*c^2*e*f))*(2*c^2*d + b^2*f - 2*a*c*f - b*c*e))/(2*c^2*(4*a*c - b^2)^(1/2))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(f*x**4+e*x**2+d)/(c*x**4+b*x**2+a),x)

[Out]

Timed out

________________________________________________________________________________________